1. Technical Field
The present invention relates to data processing systems and, in particular, to messaging systems in a distributed processing environment. Still more particularly, the present invention provides a distributed messaging system supporting stateful subscriptions.
2. Description of Related Art
A publish-subscribe messaging middleware is a system in which there are two types of clients. Publishers generate messages, also referred to as events, containing a topic and some data content. Subscribers request a criterion, also called a subscription, specifying what kind of information, based on published messages, the system is to deliver in the future. Publishers and subscribers are anonymous, meaning that publishers do not necessarily know how many subscribers there are or where they are and, similarly, subscribers do not necessarily know where publishers are.
A topic-based, or content-based, publish-subscribe system is one in which the delivered messages are a possibly filtered subset of the published messages and the subscription criterion is a property that can be tested on each message independent of any other message. For example, a filter may determine whether “topic=stock-ticker” or “volume>1000.” Content-based or topic-based publish-subscribe systems are referred to herein as “stateless.”
There are pre-existing and emerging alternative technologies to solve the deficiencies of content-based publish-subscribe systems. Message mediators may be introduced into the flow of traditional messaging middleware. This is a useful concept; however, in their current manifestations, mediators are complex to program, require external database services in order to store and access state, and groups of mediators cannot be automatically combined.
Traditional database systems may also be used. Each published message can be fed to a database and give rise to a cascade of transactions updating the message history. Subscriptions can be expressed as views of these histories. Technologies are being developed to allow views to be updated incrementally. Such an approach is easier to program; however, it can be costly and slow if each new message results in a transaction involving a large number of subscribers.
An emerging technology still being researched is continuous queries on data streams. These approaches preserve the simpler programming model of the database system approach above and attempt to reduce the cost of traditional databases by a combination of approaches, including batching message updates and restricting the available operations to ones allowing the use of bounded-sized, in-memory sliding windows. However, this approach is restricting and limited.